export interface IClone<T> {
  Clone(): T;
}

export class Resume implements IClone<Resume> {
  private name: string;
  private sex!: string;
  private age!: string;
  private timeArea!: string;
  private company!: string;

  constructor(name: string) {
    this.name = name;
  }

  public SetPersonalInfo(sex: string, age: string) {
    this.age = age;
    this.sex = sex;
  }

  public SetWorkExperience(timeArea: string, company: string) {
    this.company = company;
    this.timeArea = timeArea;
  }

  public Display(): string[] {
    const _arr: string[] = [];
    _arr.push(`${this.name} ${this.sex} ${this.age}`);
    _arr.push(`工作经历: ${this.timeArea} ${this.company}`);
    return _arr;
  }

  public Clone(): Resume {
    const c = new Resume(this.name);
    c.sex = this.sex;
    c.timeArea = this.timeArea;
    c.age = this.age;
    c.company = this.company;

    return c;
  }
}
